]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell/global: Plug a leak
authorAlessandro Bono <alessandro.bono369@gmail.com>
Mon, 29 Jun 2026 11:16:55 +0000 (13:16 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 2 Aug 2026 16:49:16 +0000 (18:49 +0200)
Use g_autoptr to ensure the variant is always freed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4275>
(cherry picked from commit 2405521d039fa61f754c190b6f3fd5a0b7f8c2da)

src/shell-global.c

index dc4075e26a8e669d21fa5b399529aea777947595..443376f776d96e44abdd458db89372954cdc572c 100644 (file)
@@ -148,7 +148,7 @@ got_switcheroo_control_gpus_property_cb (GObject      *source_object,
 {
   ShellGlobal *global;
   GError *error = NULL;
-  GVariant *gpus;
+  g_autoptr (GVariant) gpus = NULL;
 
   gpus = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object),
                                         res, &error);